<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../common/Top.jsp" %>

<div id="BackLink">
    <a href="index.jsp">返回主页面>></a>
</div>

<div class="table-contain">
    <table id="orderTable">
        <tr>
            <th>下单时间</th>
            <th>订单编号</th>
            <th>商品图片</th>
            <th>商品编号</th>
            <th>商品名</th>
            <th>单价</th>
            <th>数量</th>
            <th>总计</th>
            <th>操作</th>
        </tr>
        <c:if test="${fn:length(sessionScope.orderList) == 0}">
            <tr>
                <td colspan="9">暂无订单</td>
            </tr>
        </c:if>
        <c:forEach items="${sessionScope.orderList}" var="order">
            <tr id="tr${order.orderid}">
                <td>${order.time}</td>
                <td>${order.orderid}</td>
                <td>${order.imageSrc}</td>
                <td>${order.productid}</td>
                <td>${order.name}</td>
                <td>￥${order.unitprice}</td>
                <td>${order.num}</td>
                <td>￥${order.price}</td>
                <td>${order.orderSrc}<br><a class="orderLink" onclick="deleteOrder(${order.orderid});">删除</a></td>
            </tr>
        </c:forEach>
        <script type="text/javascript" src="./js/deleteOrder.js" charset="UTF-8"></script>
    </table>
</div>
<%@ include file="../common/Bottom.jsp" %>